HTML lists
- There are three t XX ypes of HTML lists: ordered, unordered, and definition.
- Ordered lists use numbers.
- Unordered lists use bullets.
- Definition lists are used to define terminology.
- Lists can be nested inside one another.
Boxes
- CSS treats each HTML element as if it has its own box.
- You can use CSS to control the dimensions of a box.
- You can also control the borders, margin and padding for each box with CSS.
- It is possible to hide elements using the display and visibility properties.
- Block-level boxes can be made into inline boxes, and inline boxes made into block-level boxes.
- Legibility can be improved by controlling the width of boxes containing text and the leading.
- CSS3 has introduced the ability to create image borders and rounded borders.
Comparison and logical operators
You may be familiar with comparison operators from math class. Let’s make sure there aren’t any gaps in your knowledge.
Comparison Operators
- Less than (<) — returns true if the value on the left is less than the value on the right, otherwise it returns false.
- Greater than (>) — returns true if the value on the left is greater than the value on the right, otherwise it returns false.
- Less than or equal to (<=) — returns true if the value on the left is less than or equal to the value on the right, otherwise it returns false.
- Greater than or equal to (>=) — returns true if the value on the left is greater than or equal to the value on the right, otherwise it returns false.
- Equal to (===) — returns true if the value on the left is equal to the value on the right, otherwise it returns false.
- Not equal to (!==) — returns true if the value on the left is not equal to the value on the right, otherwise it returns false.
Logical Operators
Comparison operators allow us to assert the equality of a statement with JavaScript. For example, we can assert whether two values or expressions are equal with ===, or, whether one value is greater than another with >.
There are scenarios, however, in which we must assert whether multiple values or expressions are true. In JavaScript, we can use logical operators to make these assertions.
&& (and) — This operator will be truthy (act like true) if and only if the expressions on both sides of it are true.
|| (or) — This operator will be truthy if the expression on either side of it is true. Otherwise, it will be falsy (act like false).
While loop
The while loop loops through a block of code as long as a specified condition is true.
while (condition) {
// code block to be executed
}
For loop
The for loop has the following syntax:
for (statement 1; statement 2; statement 3) {
// code block to be executed
}
Thank you